﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using XProject.DataVisit.Factory;

namespace XProject.DataVisit.Model.Role
{
    public class GYMenu:IProjectModel
    {
        public virtual Guid PID { get; set; }
        /// <summary>
        /// 菜单名称
        /// </summary>
        public virtual string MenuName { get; set; }
        /// <summary>
        /// 菜单连接地址
        /// </summary>
        public virtual string MenuUrl { get; set; }
        /// <summary>
        /// 菜单框架
        /// </summary>
        public virtual string MenuFm { get; set; }
        /// <summary>
        /// 菜单图片
        /// </summary>
        public virtual string MenuImg { get; set; }
        /// <summary>
        /// 后台菜单图片
        /// </summary>
        public virtual string SysImg { get; set; }
        /// <summary>
        /// 父菜单ID
        /// </summary>
        public virtual Guid? ParentID { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public virtual int OrderID { get; set; }

        /// <summary>
        /// 样式名称
        /// </summary>
        public virtual string ClassName { get; set; }

        /// <summary>
        /// ID号
        /// </summary>
        public virtual string NameID { get; set; }

        /// <summary>
        /// 子菜单
        /// </summary>
        public virtual IList<GYMenu> ChildMenu
        {
            get
            {
            if (PID != Guid.Empty && PID!=null)
                return DaoFactory.MenuDao.GetListByKey(PID);
            return null;
        } }
    }
}
